1. Technical Field
The present invention relates to portable computers in general, and in particular to portable computers and docking stations. Still more particularly, the present invention relates to a method for docking/undocking a portable computer to/from an expansion unit.
2. Description of the Prior Art
The number of functions that a portable computer, such as a notebook personal computer (PC), a sub-notebook PC, a palm-top PC, or a Personal Data Assistant (PDA), can provided is limited. An expansion unit or a docking station, can typically be utilized to increase the number of functions of a portable computer.
The procedure of electrically and logically connecting a portable computer to a docking station is commonly referred to as docking. A portable computer cannot operate an expansion unit when the portable computer is only electrically connected to the docking station. In order for the portable computer to operate the docking station, an operating system (OS) within the portable computer is required to recognize the docking station via a procedure known as logical connection. Docking is not completed until the OS logically connects the docking station to the portable computer such that the portable computer is ready to use the docking station. Conversely, electrically and logically separating a portable computer from the docking station is referred to as undocking. Hot docking or hot undocking refers to docking or undocking a portable computer when the portable computer is in an active or operating state. Warm docking or warm undocking refers to docking or undocking the portable computer when the portable computer is in a suspended or standby state.
Typically, a second battery is included within an expansion unit. If the expansion unit is undocked while the second battery is charged or discharged, the portable computer is shut down. This is because the portable computer uses the second battery of the expansion unit when the portable computer is docked at the expansion unit. When the portable computer is undocked, it is impossible to use the second battery of the expansion unit. Thus, the portable computer must switch power routes from the second battery to the main battery of the portable computer. Because it takes a long time to switch power routes, it is impossible to immediately correspond to undocking of the docking station.
An inexpensive system typically does not have a PCI-PCI bridge chip, and a PCI bus of the inexpensive system is directly connected to a PCI bus of an expansion unit by only putting a bus switch between the two buses. As a result, docking/undocking can only be executed when the system is suspended or powered off. In other words, hot docking/undocking cannot be performed.
When a portable computer is hot docked to a docking station having an IDE device and an FDD device, latch-up can occur if the interfaces of these devices are being hot docked. As a result, these devices could be damaged.
When a portable computer supports warm undocking, a problem occurs when there is an increase in time required for resuming from a suspended state. This is because an OS for supporting warm undocking must eject (logically separate) every resource that may be warm undocked whenever a system is suspended. As a result, the OS must perform enumeration of a resource whenever the system resumes from the suspended state.
In light of all the above-mentioned problems, it would be desirable to provide an improved method for docking/undocking a portable computer to/from an expansion unit.
In accordance with a preferred method of the present invention, a portable computer includes a main battery, and an expansion unit includes a second battery. In response to an eject event, the condition of the second battery is determined. If the second battery is in a discharging condition, a power supply route is switched from the second battery of the expansion unit to the main battery of the portable computer. If the second battery is in a charging condition, the charging condition is suspended. At this point, a hot undocking of the portable computer from the expansion unit can be performed.
All objects, features, and advantages of the present invention will become apparent in the following detailed written description.